package com.zjeav.lingjiao.ui.home.Find;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.zjeav.lingjiao.R;
import com.zjeav.lingjiao.base.baseBean.BaseActivity;
import com.zjeav.lingjiao.base.baseBean.Find;

public class FindActivity extends BaseActivity implements FindContract.FindView {
    ImageView find_cover_img;
    FindPresenter findPresenter;
    int id;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.finddetaillayout);
        init();
    }

    private void init() {
        id = getIntent().getIntExtra("id", 0);
        find_cover_img = findViewById(R.id.find_cover_img);
        findPresenter = new FindPresenter(this);
        findPresenter.getFindDetail(id);

    }

    @Override
    protected void onResume() {
        super.onResume();

    }

    @Override
    public void ShowFindDetail(Find find) {

        String h5url = find.getH5url();
        Intent intent = new Intent(this, FindwebViewActivity.class);
        intent.putExtra("url", h5url);
        startActivity(intent);

    }

    @Override
    public void onPause() {
        super.onPause();
    }


    @Override
    public void ShowError(Throwable throwable) {

    }
}
